public class  Postgradeate extends student{
    public Postgradeate(String name){
        this.name = name;
    }

    @Override
    public void caculateGrade() {
        super.type = "研究生";
        int average;
        int sum = 0;
        for (int i = 0; i < courseNo; i++) {
            sum += courses[i];
        }
        average = sum/courseNo;
        if(average >= 90 && average <= 100)
            courseGrade = "优秀";
        else if(average >= 80 && average < 90)
            courseGrade = "良好";
        else if(average >= 70 && average < 80)
            courseGrade = "一般";
        else if(average >= 60 && average < 70)
            courseGrade = "及格";
        else if(average >= 0 && average < 60)
            courseGrade = "不及格";
    }
}
